#pragma once

#include "types.h"
#include "shape.h"

namespace g2 {

class face {
public:
	size_type v[3]; ///< vertex indices
public:
	face(size_type v0, size_type v1, size_type v2) {
		v[0] = v0; v[1] = v1; v[2] = v2;
	}
};

// boundary vertex?
typedef std::pair<vector, bool>	vertex_info;
typedef face						face_info;

struct triangulation {
public:
	std::vector<vertex_info>	vertices;
	std::vector<face_info>		faces;
public:
	triangulation(
		const std::vector<vertex_info> & vv, 
		const std::vector<face_info> & ff)
		: vertices(vv), faces(ff) { }
};

triangulation triangulate(const shape &, double h);

} // g2
